package collector;

import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Component;

import collector.Collector;
//BeanNameAware依赖spring 一直方式很差
@Component(value="uc")
public class UsbCollector implements Collector, BeanNameAware{
	private String name;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public UsbCollector() {
		System.out.println("usb constructor.....");
	}
	
	public UsbCollector(String name) {
		super();
		this.name = name;
	}
	@Override
	public void collect() {
		System.out.println("USB collect");
	}
	
	@Override
	public void setBeanName(String arg0) {
		System.out.println(name+".......");
		
	}

}
